package com.ajk.server.model.request;

import org.springframework.web.multipart.MultipartFile;

import com.ajk.server.model.Doctor;
import com.ajk.server.utils.FileStoreUtil;

public class DoctorReq extends Doctor{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	

	private MultipartFile file;

	public MultipartFile getFile() {
		return file;
	}

	public void setFile(MultipartFile file) {
		this.file = file;
	}

	@Override
	public void dealWith() {
		super.dealWith();
		if(file!=null && file.getSize()>0){
			String fileDbName = FileStoreUtil.storeFile(file, "doctor/avator/");
			setAvatar(fileDbName);
		}
	}

}
